package code3;

public class Person extends Actor {

	public Person() {
		super();
		speed = 2;
	}

	@Override
	public int go(City city) {

		int dis = city.getDistance();
		int count = 0;
		while (true) {
			Vehicle vehicle = AbstractVehicle.getVehicle();
			// System.out.println(vehicle);
			dis -= (speed + vehicle.speedUp());
			// System.out.println(vehicle.speedUp());
			count++;
			if (dis <= 0)
				break;
		}
		return count;
	}
}
